package com.zqu.service.impl;

import com.zqu.mapper.UserRoleMapper;
import com.zqu.pojo.UserRole;
import com.zqu.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired(required = false)
    private UserRoleMapper userRoleMapper;

    @Override
    public UserRole selectUserRoleById(long id) {
        return userRoleMapper.selectTById(id);
    }

    @Override
    public List<UserRole> selectList(UserRole userRole) {
        return userRoleMapper.selectList(userRole);
    }

    @Override
    public boolean insertUserRole(UserRole userRole) {
        return userRoleMapper.insertT(userRole)>0;
    }

    @Override
    public boolean updateUserRole(UserRole userRole) {
        return userRoleMapper.updateT(userRole)>0;
    }

    @Override
    public boolean deleteUserRole(long id) {
        return userRoleMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteUserRoleByIds(String[] ids) {
        return userRoleMapper.deleteTByIds(ids)>0;
    }
}
